<!DOCTYPE>
<title>Performance Tip 2 - Avoid Expando</title>
<script type='text/javascript'>	
var MAX_ITERATIONS = 5000;
this.nkr = window.undefined;
MyObject = function() {
	this.nkr = window.undefined;
};
function test(obj) {
	var start = new Date().getTime();	
	for (var i = 0; i < MAX_ITERATIONS; i++) {
		obj.nkr = "Item "+i;
	}
	alert("test("+obj+")\n took " + (new Date().getTime()-start) + " milliseconds.");
}
</script>
<button onclick="test(window)">test(window)</button><br/>
<button onclick="test(new MyObject())">test(new MyObject())</button>&nbsp;
